﻿using System;

namespace Caramel.Entities.Scaffolding.Metadata
{
	[Serializable()]
	public class Column : IColumn
	{
		public Column(Table table)
		{
			this.Table = table;
		}

		public string Name { get; set; }

		public bool IsNullable { get; set; }

		public string DataType { get; set; }

		public Type ClrDataType { get; set; }

		public int? MaximumCharacterLength { get; set; }

		public Table Table { get; private set; }

		public override string ToString()
		{
			return this.Name;
		}
	}
}
